import allure

from api.auth import AuthAPI


class TestAuthIdCard:

    # 前置处理
    def setup_method(self):
        self.auth_api = AuthAPI()

    @allure.title("身份证二要素验证接口")
    def test01_success(self):
        data = {
            "idCardNo": "370982197309194413",
            "userCardName": "刘新光",
            "merchantId": "00013243DEF34E17A24D6EBD287097D1",
            "serviceCode": "agent"
        }
        res = self.auth_api.authIdCard(data=data)
        assert 200 == res.status_code
